<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
  <!-- <link rel="stylesheet/less" href="bootstrap/less/bootstrap.less">
  <script src="bootstrap/less/less-1.3.3.min.js"></script>
  -->
  <link href="bootstrap/bootstrap.css" type="text/css" rel="stylesheet"/>
  <link href="google-code-prettify/prettify.css" type="text/css" rel="stylesheet"/>
  <script type="text/javascript" src="google-code-prettify/prettify.js"></script>
  <link href="css/vertx.css" type="text/css" rel="stylesheet"/>
  <link href="css/sunburst.css" type="text/css" rel="stylesheet"/>
  <title>Vert.x</title>
  <script>
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-30144458-1']);
    _gaq.push(['_trackPageview']);
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  </script>
</head>

<body onload="prettyPrint()" class="hp">

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">

      <a class="btn btn-navbar" data-toggle="collapse"
         data-target=".nav-collapse">
        <span class="i-bar"></span>
        <span class="i-bar"></span>
        <span class="i-bar"></span>
      </a>

      <a class="brand" href="/">Vert.x</a>

      <div class="nav-collapse">
        <ul class="nav">
          <li><a href="/">Home</a></li>
          <li><a href="downloads.html">Download</a></li>
          <li><a href="install.html">Install</a></li>
          <li><a href="docs.html">Documentation</a></li>
          <li><a href="examples.html">Examples</a></li>
          <li><a href="community.html">Project Info</a></li>
          <li><a href="https://github.com/vert-x/vert.x">Github</a></li>
          <li><a href="http://modulereg.vertx.io/">Module Registry</a></li>
          <li><a href="http://groups.google.com/group/vertx">Google Group</a></li>
          <li><a href="http://vertxproject.wordpress.com/">Blog</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>

<div class="container">

  <div class="row">
    <div class="span12">
      <div class="well">
        <h1>Installation Guide</h1>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="span12">
      <div class="well">
<div>


<h1 id="getting-a-distro">Getting a distro</h1><br/>
<p>The easiest way to get hold of a distribution is to <a href="downloads.html">download a binary distro</a>.</p>
<p>Alternatively you can build from source. To do that clone the <a href="https://github.com/vert-x/vert.x">github repository</a>
and read the file <a href="https://github.com/vert-x/vert.x/blob/master/BUILD_README.md"><code>BUILD_README.md</code></a>.</p>
<h1 id="pre-requisites">Pre-requisites</h1><br/>
<ul>
<li>
<p>Operating System. Vert.x runs out of the box on Linux, OSX or Windows.</p>
</li>
<li>
<p>Vert.x requires JDK 1.7.0 or later. You can use the official Oracle distribution or the OpenJDK version. Make sure the JDK bin directory is on your <code>PATH</code>.</p>
</li>
</ul>
<h1 id="install-vertx">Install Vert.x</h1><br/>
<p>Once you've got the pre-requisites installed, you install Vert.x as follows:</p>
<ol>
<li>Unzip the distro somewhere sensible (e.g. your home directory)</li>
<li>Add the Vert.x <code>bin</code> directory to your <code>PATH</code> environment variable.</li>
</ol>
<p>For example</p>
<pre class="prettyprint">tar -zxf ~/Downloads/vert.x-2.0.0-final.tar.gz
</pre>
<p>or</p>
<pre class="prettyprint">unzip ~/Downloads/vert.x-2.0.0-final.tar.gz
</pre>
<h2 id="check-the-version">Check the version</h2><br/>
<p>To make sure you've installed it correctly, use <code>vertx version</code> to display the version.</p>
<pre class="prettyprint">$ vertx version
vert.x 2.0.0-final (built ...)
</pre>
<p>You should see output something like the above.</p>
<h1 id="testing-the-install">Testing the install</h1><br/>
<p>Let's test the install by writing a simple web server.</p>
<p>Copy the following into a text editor and save it as <code>server.js</code></p>
<pre class="prettyprint">var vertx = require('vertx');

vertx.createHttpServer().requestHandler(function(req) {
  req.response.end("Hello World!");
}).listen(8080, 'localhost');
</pre>
<p>Open a console in the directory where you saved it, and type:</p>
<pre class="prettyprint">vertx run server.js
</pre>
<p>Open your browser and point it at <a href="http://localhost:8080">http://localhost:8080</a></p>
<p>If you see "Hello World!" in the browser then you're all set to go!</p></div>
      </div>
    </div>
  </div>

</div>

</body>
</html>